import requests from '@/utils/request';

// 查询角色菜单根据角色ID
export const reqGetRoleMenuListByRoleId = (roleId) =>
  requests.get(`admin/roleMenu/getRoleMenuListByRoleId/${roleId}`);

// 根据角色编号来更新角色菜单
export const reqEditByRowId = (roleId, menuIds) =>
  requests({
    url: 'admin/roleMenu/editByRowId',
    method: 'put',
    // headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
    data: {
      roleId,
      menuIds,
    },
  });
